package sh.grapendaal.tsuushin.module.uno.engine.domain.achievement;

import sh.grapendaal.tsuushin.module.uno.engine.dto.GameState;

public abstract class Achievement {
	public abstract String getName();
	
	public abstract String getDescription();
	
	public abstract boolean isEarned(GameState gameState);

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj instanceof Achievement) {
			Achievement other = (Achievement) obj;
			return getName().equals(other.getName());
		}
		return false;
	}

	@Override
	public int hashCode() {
		return getName().hashCode();
	}

	@Override
	public String toString() {
		return getName();
	}
}
